package com.zsx.shopping.common.api.product.feign;

import com.zsx.shopping.common.api.R;
import com.zsx.shopping.common.api.product.vo.SkuVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@FeignClient("shopping-product")
public interface ProductFeignService {

    @GetMapping("/product/sku/skus")
    R<List<SkuVO>> getSkus(@RequestParam("skuIds") List<Long> skuIds);

    @PostMapping("/product/sku/totalPrice")
    R<BigDecimal> getTotalPrice(@RequestBody Map<Long, Integer> map);

    @PutMapping("/product/sku/cache/goods")
    R<Void> cacheGoods(@RequestParam("skuIds") List<Long> skuIds);
}
